package plugins.imageViewer
{
	import flash.display.Bitmap;
	import flash.display.DisplayObject;
	import flash.display.Sprite;
	
	import memory.MemoryRecovery;

	public class ImageListItem extends Sprite
	{
		public var image:Bitmap;
		public var id:int=-1;
		public function ImageListItem()
		{
			super();
			this.useHandCursor=true;
			this.buttonMode=true;
		}
		override public function addChild(child:DisplayObject):DisplayObject
		{
			super.addChild(child);
			this.image=Bitmap(child);
			return child;
		}
		public function dispose():void
		{
			MemoryRecovery.getInstance().gcObj(this.image);this.image=null;
		}
	}
}